<template>
    <div>
        <router-view v-slot="{ Component, route }">
            <keep-alive v-if="route.meta.keepAlive">
                <component :is="Component" />
            </keep-alive>
            <component v-else :is="Component" />
        </router-view>
        <div class="placeholder"></div>
        <div class="footer">
            <router-link to="/">
                <div class="menu">首页</div>
            </router-link>
            <router-link to="/about">
                <div class="menu">关于</div>
            </router-link>
        </div>
    </div>
</template>

<script setup>
</script>

<style scoped>
.placeholder,
.footer {
    width: 100%;
    height: 4rem;
    background-color: #FFFFFF;
}

.footer {
    background-color: #FFFFFF;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 12px rgb(0 0 0 / 25%);
}

.menu {
    width: 5rem;
}
</style>
